package ifm4j.collections.treeCollections.factories;

import ifm4j.collections.treeCollections.TreeObject;
import ifm4j.utils.Identifier;

import org.w3c.dom.Element;

public abstract class TreeObjectFactory {
    private String treeObjectClassName;

    private TreeNodeType nodeType;

    public abstract TreeObject constructNewInstance(Identifier id, Object[] args);

    /**
     * public delegate void TreeXmlParse(XElement xelem, Tree tree);
     */
    public abstract void xmlParser(Element elem, TreeObject treeObject);

    public TreeObjectFactory(String treeObjectClassName, TreeNodeType nodeType) {
        this.treeObjectClassName = treeObjectClassName;
        this.nodeType = nodeType;
    }

    public final String getTreeClassName() {
        return this.treeObjectClassName;
    }

    public final TreeNodeType getNodeType() {
        return this.nodeType;
    }
}
